const accessRouterMap = {
    PermissionList: () => import('@/access/views/permission/List.vue'),
    PermissionEdit: () => import('@/access/views/permission/Edit.vue'),
    RoleList: () => import('@/access/views/rule/List.vue'),
    RoleAuthorize: () => import('@/access/views/rule/Authorize.vue'),
    RoleGroupList: () => import('@/access/views/rule_group/List.vue'),
    AdminUserList: () => import('@/access/views/user/List.vue'),
    AdminUserEdit: () => import('@/access/views/user/Edit.vue')
};

const accessRouter = [{
        path: '/list/permission',
        name: 'PermissionList',
        component: accessRouterMap['PermissionList'],
        meta: {
            subKey: '/setting',
            title: "资源列表",
            subTitle: "管理系统中的资源列表"
        }
    },{
        path: '/:env/permission/:id',
        name: 'PermissionEdit',
        component: accessRouterMap['PermissionEdit'],
        meta: {
            subKey: '/setting',
            title: "资源维护"
        }
    },
    {
        path: '/list/rule',
        name: 'RuleList',
        component: accessRouterMap['RoleList'],
        meta: {
            subKey: '/setting',
            title: "角色列表",
            subTitle: "管理系统的角色列表"

        }
    },
    {
        path: '/ruleAuthorize/rule/:id',
        name: 'RoleAuthorize',
        component: accessRouterMap['RoleAuthorize'],
        meta: {
            subKey: '/setting',
            title: "角色授权"
        }
    },
    {
        path: '/list/rule/group',
        name: 'RoleGroupList',
        component: accessRouterMap['RoleGroupList'],
        meta: {
            subKey: '/setting',
            title: "角色组列表",
            subTitle: "管理系统的角色组列表"

        }
    },
    {
        path: '/list/admin/user',
        name: 'AdminUserList',
        component: accessRouterMap['AdminUserList'],
        meta: {
            subKey: '/setting',
            title: "用户列表",
            subTitle: "管理系统的用户列表"
        }
    },
    {
        path: '/:env/admin/user/:id',
        name: 'AdminUserEdit',
        component: accessRouterMap['AdminUserEdit'],
        meta: {
            subKey: '/setting',
            title: "用户维护"
        }
    },
]

export default {
    accessRouter: accessRouter
}